<Ui xmlns="http://www.blizzard.com/wow/ui/"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
    <!--
    Decursive (v 2.0) add-on for World of Warcraft UI
    Copyright (C) 2006-2007 John Wellesz (Archarodim) ( http://www.2072productions.com/?to=decursive.php )
    This is the continued work of the original Decursive (v1.9.4) by Quu
    Decursive 1.9.4 is in public domain ( www.quutar.com )

    License:
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    -->
    <Script>

	if not DcrLoadedFiles or not DcrLoadedFiles["Decursive.lua"] then
	    if not DcrCorrupted then message("Decursive installation is corrupted! (Decursive.lua not loaded)"); end;
	    DcrCorrupted = true;
	end

	-- Dcr:SetDateAndRevision("$Date: 2007-12-02 22:31:14 +0100 (dim., 02 déc. 2007) $", "$Revision: 56465 $");
    </Script>


    <Frame name="DecursiveMainBar" frameStrata="LOW" toplevel="true" enableMouse="true" movable="true" hidden="false" parent="UIParent"> <!-- {{{ -->
	<Size>
	    <AbsDimension x="80" y="25" />
	</Size>

	<Anchors>
	    <Anchor point="TOP">
		<Offset>
		    <AbsDimension x="0" y="-50"/>
		</Offset>
	    </Anchor>
	</Anchors>

	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
	    <EdgeSize>
		<AbsValue val="16"/>
	    </EdgeSize>
	    <TileSize>
		<AbsValue val="16"/>
	    </TileSize>
	    <BackgroundInsets>
		<AbsInset left="5" right="5" top="5" bottom="5"/>
	    </BackgroundInsets>
	</Backdrop>

	<Layers>
	    <Layer level="OVERLAY">
		<FontString name="$parentText" inherits="GameFontNormal" text="BINDING_HEADER_DECURSIVE">
		    <Anchors>
			<Anchor point="TOP" relativePoint="TOP">
			    <Offset>
				<AbsDimension x="0" y="-5"/>
			    </Offset>
			</Anchor>
		    </Anchors>
		</FontString>
	    </Layer>
	</Layers>

	<Scripts>
	    <OnEnter>
		if DecursiveSelfDiagnostic() ~= 2 then

		Dcr:DisplayTooltip(
		string.format(
		"|cFF0055AA%s|r %s by %s|r\n" ..
		"|cFF11FF11%s|r: %s\n" ..
		"|cFF11FF11%s|r / |cFF11FF11%s|r-|cFF11FF11%s|r"
		, Dcr.name, Dcr.version, Dcr.author,
		Dcr.L[Dcr.LOC.HLP_RIGHTCLICK], Dcr.L[Dcr.LOC.STR_OPTIONS],
		Dcr.L[Dcr.LOC.HLP_MIDDLECLICK], Dcr.L[Dcr.LOC.SHIFT], Dcr.L[Dcr.LOC.HLP_LEFTCLICK]
		)
		, this);
		end
	    </OnEnter>
	    <OnLeave>
		DcrDisplay_Tooltip:Hide();
	    </OnLeave>

	    <OnMouseUp>
		if ( this.isMoving ) then
		this:StopMovingOrSizing();
		this.isMoving = false;
		end
		Dcr:SaveLLPos();
	    </OnMouseUp>
	    <OnMouseDown>
		if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) or IsAltKeyDown()) and ( arg1 == "LeftButton" ) ) then
		this:StartMoving();
		this.isMoving = true;
		end
		if (arg1 == "MiddleButton" or arg1 == "LeftButton" and IsShiftKeyDown()) then
		Dcr:ShowHideButtons();
		end
	    </OnMouseDown>
	    <OnHide>
		if ( this.isMoving ) then
		this:StopMovingOrSizing();
		this.isMoving = false;
		end
	    </OnHide>
	    <OnLOad>
		this:RegisterEvent("ADDON_LOADED");
	    </OnLOad>
	    <OnEvent>
		if event == "ADDON_LOADED" and arg1 == "Decursive" then
		    DecursiveSelfDiagnostic();
		end
	    </OnEvent>
	</Scripts>

	<Frames>
	    <Button name="$parentPriority" inherits="GameMenuButtonTemplate" text="P"> <!-- {{{ -->
		<Size>
		    <AbsDimension x="20" y="20" />
		</Size>
		<Anchors>
		    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
			<Offset>
			    <AbsDimension x="0" y="0" />
			</Offset>
		    </Anchor>
		</Anchors>
		<Scripts>
		    <OnLoad>
			this:SetText(Dcr.L[Dcr.LOC.PRIORITY_SHOW]);
		    </OnLoad>
		    <OnClick>
			if DecursiveSelfDiagnostic(true) ~= 2 then
			Dcr:ShowHidePriorityListUI();
			end
		    </OnClick>
		    <OnEnter>
			if DecursiveSelfDiagnostic() ~= 2 then
			Dcr:DisplayTooltip(Dcr.L[Dcr.LOC.PRIORITY_LIST], this);
			end
		    </OnEnter>
		    <OnLeave>
			DcrDisplay_Tooltip:Hide();
		    </OnLeave>
		</Scripts>
	    </Button>  <!-- }}} -->

	    <Button name="$parentSkip" inherits="GameMenuButtonTemplate" text="S">  <!-- {{{ -->
		<Size>
		    <AbsDimension x="20" y="20" />
		</Size>
		<Anchors>
		    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentPriority">
			<Offset>
			    <AbsDimension x="0" y="0" />
			</Offset>
		    </Anchor>
		</Anchors>
		<Scripts>
		    <OnLoad>
			this:SetText(Dcr.L[Dcr.LOC.SKIP_SHOW]);
		    </OnLoad>
		    <OnClick>
			if DecursiveSelfDiagnostic(true) ~= 2 then
			Dcr:ShowHideSkipListUI();
			end
		    </OnClick>
		    <OnEnter>
			if DecursiveSelfDiagnostic() ~= 2 then
			Dcr:DisplayTooltip(Dcr.L[Dcr.LOC.SKIP_LIST_STR], this);
			end
		    </OnEnter>
		    <OnLeave>
			DcrDisplay_Tooltip:Hide();
		    </OnLeave>
		</Scripts>
	    </Button>  <!-- }}} -->

	    <Button name="$parentHide" inherits="GameMenuButtonTemplate" text="X">  <!-- {{{ -->
		<Size>
		    <AbsDimension x="20" y="20" />
		</Size>
		<Anchors>
		    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentSkip">
			<Offset>
			    <AbsDimension x="2" y="0" />
			</Offset>
		    </Anchor>
		</Anchors>
		<Scripts>
		    <OnClick>
			if DecursiveSelfDiagnostic(true) ~= 2 then
			Dcr:HideBar(false);
			end
		    </OnClick>
		    <OnEnter>
			if DecursiveSelfDiagnostic() ~= 2 then
			Dcr:DisplayTooltip(Dcr.L[Dcr.LOC.HIDE_MAIN], this);
			end
		    </OnEnter>
		    <OnLeave>
			DcrDisplay_Tooltip:Hide();
		    </OnLeave>
		</Scripts>
	    </Button>  <!-- }}} -->
	</Frames>

    </Frame> <!-- }}} -->

    <!-- ================================================================== -->
   
    <Frame name="DecursiveAnchor" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent"> <!-- {{{ -->
	<Size>
	    <AbsDimension x="180" y="25"/>
	</Size>

	<Anchors>
	    <Anchor point="TOP" relativeTo="UIErrorsFrame" relativePoint="BOTTOM">
		<Offset>
		    <AbsDimension x="0" y="0"/>
		</Offset>
	    </Anchor>
	</Anchors>

	<TitleRegion setAllPoints="true"/>

	<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
	    <EdgeSize>
		<AbsValue val="16"/>
	    </EdgeSize>
	    <TileSize>
		<AbsValue val="16"/>
	    </TileSize>
	    <BackgroundInsets>
		<AbsInset left="5" right="5" top="5" bottom="5"/>
	    </BackgroundInsets>
	</Backdrop>

	<Layers>
	    <Layer level="BACKGROUND">
		<FontString name="$parentText" inherits="GameFontNormal" text="Dcr.LOC.ANCHOR">
		    <Anchors>
			<Anchor point="TOP">
			    <Offset>
				<AbsDimension x="0" y="-5"/>
			    </Offset>
			</Anchor>
		    </Anchors>
		</FontString>
	    </Layer>
	</Layers>
	<Frames>
	    <Button name="$parentDirection" inherits="GameMenuButtonTemplate" text=".">
		<Size>
		    <AbsDimension x="20" y="17" />
		</Size>
		<Anchors>
		    <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="$parent">
			<Offset>
			    <AbsDimension x="-10" y="-4" />
			</Offset>
		    </Anchor>
		</Anchors>
		<Scripts>

		    <OnClick>
			Dcr.profile.CustomeFrameInsertBottom = (not Dcr.profile.CustomeFrameInsertBottom);
			Dcr:ChangeTextFrameDirection(Dcr.profile.CustomeFrameInsertBottom);

			Dcr:Println("|cFFAAAAAATEST");

		    </OnClick>
		    <OnShow>
			Dcr:ThisSetParentText(Dcr.L[Dcr.LOC.ANCHOR]);
		    </OnShow>
		</Scripts>
	    </Button>
	</Frames>
    </Frame> <!-- }}} -->

    <MessageFrame name="DecursiveTextFrame" insertMode="TOP" parent="UIParent" frameStrata="HIGH" toplevel="true" > <!-- {{{ -->
	<Size>
	    <AbsDimension x="600" y="140"/>
	</Size>
	<Anchors>
	    <Anchor point="TOP" relativeTo="DecursiveAnchor" relativePoint="BOTTOM">
		<Offset>
		    <AbsDimension x="0" y="0"/>
		</Offset>
	    </Anchor>
	</Anchors>

	<FontString inherits="GameFontNormal" justifyH="CENTER"/>
    </MessageFrame> <!-- }}} -->

    <GameTooltip name="DcrDisplay_Tooltip" hidden="true" inherits="GameTooltipTemplate" parent="UIParent" />

    <Frame name="Decursive" />

    <Script>
	DcrLoadedFiles["Decursive.xml"] = "2.3.0";
    </Script>
</Ui>
